/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.plt.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class VinculadoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "FID_PERSONA_NATURAL", nullable = false)
    private long fidPersonaNatural;
    @Basic(optional = false)
    @Column(name = "FID_PERSONA_VINCULADO", nullable = false)
    private long fidPersonaVinculado;

    public VinculadoPK() {
    }

    public VinculadoPK(long fidPersonaNatural, long fidPersonaVinculado) {
        this.fidPersonaNatural = fidPersonaNatural;
        this.fidPersonaVinculado = fidPersonaVinculado;
    }

    public long getFidPersonaNatural() {
        return fidPersonaNatural;
    }

    public void setFidPersonaNatural(long fidPersonaNatural) {
        this.fidPersonaNatural = fidPersonaNatural;
    }

    public long getFidPersonaVinculado() {
        return fidPersonaVinculado;
    }

    public void setFidPersonaVinculado(long fidPersonaVinculado) {
        this.fidPersonaVinculado = fidPersonaVinculado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) fidPersonaNatural;
        hash += (int) fidPersonaVinculado;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VinculadoPK)) {
            return false;
        }
        VinculadoPK other = (VinculadoPK) object;
        if (this.fidPersonaNatural != other.fidPersonaNatural) {
            return false;
        }
        if (this.fidPersonaVinculado != other.fidPersonaVinculado) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.plt.be.VinculadoPK[fidPersonaNatural=" + fidPersonaNatural + ", fidPersonaVinculado=" + fidPersonaVinculado + "]";
    }

}
